<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>Aurora 后台管理</title>
  <!-- build:css -->
  <link rel="stylesheet" th:href="@{'/css/github_activity_widget.css'}">
  <link rel="stylesheet" th:href="@{'/css/jquery.jOrgChart.css'}">
  <link rel="stylesheet" th:href="@{'/plugins/css/layui.css'}">
  <link rel="stylesheet" th:href="@{'/plugins/spop/spop.css'}">
  <link rel="stylesheet" th:href="@{'/plugins/css/theme/default.css'}" th:id="theme">
  <link rel="stylesheet" th:href="@{'/plugins/font-awesome/css/font-awesome.min.css'}">
  <script>
      var xmlhttp = new XMLHttpRequest();
      xmlhttp.open("GET","/pageviews/plusCount?t"+Math.random(),true);
      xmlhttp.send();
  </script>
  <!-- endbuild -->
</head>
<body class="layui-layout-body kit-theme-default">
  <input hidden="hidden" id="isParent">
  <div class="layui-layout layui-layout-admin">
    <!-- header -->
    <div class="layui-header">
      <div class="layui-logo">
        <div class="layui-logo-toggle" kit-toggle="side" data-toggle="on">
          <i class="layui-icon">&#xe65a;</i>
        </div>
        <div class="layui-logo-brand">
          <a href="#/">Aurora 1.1</a>
        </div>
      </div>
      <div class="layui-layout-left">
      </div>
        <div id="tp-weather-widget" style="margin-top: -3%;margin-left: 71%"></div>
        <script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script","tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
        <script>tpwidget("init", {
            "flavor": "slim",
            "location": "WX4FBXXFKE4F",
            "geolocation": "enabled",
            "language": "auto",
            "unit": "c",
            "theme": "chameleon",
            "container": "tp-weather-widget",
            "bubble": "enabled",
            "alarmType": "circle",
            "color": "#FFFFFF",
            "uid": "UDA3C883F3",
            "hash": "5c9a4a9843c8fc8e069f5dba6a33f081"
        });
        tpwidget("show");</script>
      <div class="layui-layout-right">
        <ul class="kit-nav" lay-filter="header_right">
          <li class="kit-item" kit-target="help" style="color: #fff;margin-right:10px;">
              <i class="layui-icon">&#xe607;</i>
              <span>帮助</span>
          </li>
          <li class="kit-item" kit-target="lock">
              <a href="javascript:;" title="点击锁屏">
                <i class="fa fa-lock" aria-hidden="true"></i>
              </a>
          </li>
          <li class="kit-item">
            <a href="javascript:;">
              <span>
                <img th:src="@{${user.avatar}}" class="layui-nav-img"><span th:text="${user.username}"></span>
              </span>
            </a>
              <ul class="kit-nav-child kit-nav-right">
                  <li class="kit-item">
                      <a href="#/user/info">
                          <i class="layui-icon">&#xe612;</i>
                          <span>个人中心</span>
                      </a>
                  </li>
                  <li class="kit-item" kit-target="setting">
                      <a href="javascript:;">
                          <i class="layui-icon">&#xe614;</i>
                          <span>设置</span>
                      </a>
                  </li>
                  <li class="kit-nav-line"></li>
                  <li class="kit-item">
                      <a th:href="@{/logout}">
                          <i class="layui-icon">&#x1006;</i>
                          <span>注销</span>
                      </a>
                  </li>
              </ul>
          </li>
        </ul>
      </div>
    </div>
    <!-- silds -->
    <div class="layui-side" kit-side="true">
      <div class="layui-side-scroll">
        <div id="menu-box">
          <ul class="kit-menu">
            <li class="kit-menu-item">
              <a href="#/">
                  <i class="layui-icon layui-icon-snowflake"></i>
                  <span>首页</span>
              </a>
            </li>
            <li th:each="menu,stat: ${menus}" class="kit-menu-item">
                <a th:if="${menu.level==1}" href="javascript:;">
                    <i th:class="'layui-icon '+${menu.ico}"></i>
                    <span th:text="${menu.name}"></span>
                </a>
                <ul th:if="${menu.levelNum!=0}" class="kit-menu-child layui-anim layui-anim-upbit">
                    <li th:each="menu1,stat1: ${menus}" class="kit-menu-item">
                        <a th:if="${menu1.pid == menu.id}" th:href="@{${menu1.iframe?menu1.url:'#'+menu1.url}}" th:target="${menu1.iframe?'_blank':''}">
                            <i th:class="'layui-icon '+${menu1.ico}"></i>
                            <span th:text="${menu1.name}"></span>
                        </a>
                    </li>
                </ul>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <!-- main -->
    <div class="layui-body" kit-body="true">
      <router-view></router-view>
    </div>
    <!-- footer -->
    <div class="layui-footer" kit-footer="true">
      2018 © <a href="https://www.zhengjie.me" target="_blank">zhengjie.me</a> Apache Licence 2.0
      <div style="width:400px; height:400px;" class="load-container load1">
        <div class="loader">Loading...</div>
      </div>
    </div>
  </div>

  <!-- build:js -->
  <script th:src="@{'/js/jquery.min.js'}"></script>
  <script th:src="@{'/plugins/polyfill.min.js'}"></script>
  <script th:src="@{'/plugins/layui.js'}"></script>
  <script th:src="@{'/plugins/kitadmin.js'}"></script>
  <script th:src="@{'/plugins/mockjs-config.js'}"></script>
  <script th:src="@{'/plugins/spop/spop.min.js'}"></script>
  <script th:src="@{'/js/aurora.js'}"></script>
  <!-- build:use -->
  <script>
      /**
       * 读取缓存中的主题配置
       * @type {string}
       */
      var themeKey = 'KITADMIN_SETTING_THEME';
      var theme = localStorage.getItem(themeKey);
      if(theme != null){
          var themeName = $.parseJSON(theme).theme;
          var str = $('#theme').attr('href');
          var _themeUrl = str.substr(0, str.lastIndexOf('/') + 1);
          $('#theme').attr('href', _themeUrl + themeName + '.css');
          var _body = $('body');
          if (!_body.hasClass('kit-theme-' + themeName)) {
              _body.addClass('kit-theme-' + themeName);
          }
      }
      layui.config({
          base: 'js/'
      }).use('index');
  </script>
  <script data-th-inline="javascript">
      var userName = [[${user.username}]];
  </script>
  <!-- endbuild -->
</body>
</html>